#include "myplugin.h"
#include <QAction>
#include <QToolBar>

MyPlugin::MyPlugin(QgisInterface* interface,
                   QString const &name,
                   QString const &description,
                   QString const &category,
                   QString const &version,
                   PluginType type)
    :QgisPlugin(name, description, category, version, type)
    ,interface(interface)
{
    connect(interface, SIGNAL(initializationCompleted()), this, SLOT(initFinished()));
}

MyPlugin::~MyPlugin()
{

}


void MyPlugin::initFinished()
{

}

void MyPlugin::initGui()
{
    action = new QAction("test");
    interface->mapNavToolToolBar()->addAction(action);
}

void MyPlugin::unload()
{
    if(action) {
        delete action;
    }
}
